package com.webSite.demo.cy.indie.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.webSite.demo.cy.bean.HomeYeWu;
import com.webSite.demo.cy.mapper.HomeYeWuMapper;
import com.webSite.demo.cy.service.CommonService;

@Controller  
@EnableAutoConfiguration
public class YeWuController {

	@Autowired
	HomeYeWuMapper homeYeWuMapper;
	@Autowired
	CommonService commonService;
	
	@RequestMapping("/yewu.html")  
    String yewu(Model model) {
		List<HomeYeWu> list = homeYeWuMapper.findAllInfo();
		if(!list.isEmpty()) {
			model.addAttribute("list", list);
		}
		model.addAttribute("MetaList", commonService.findMete("公司业务"));
		model.addAttribute("menu", "yewu");
        return "yewu";  
    }
}
